package nl.ru.rd.facedetection.nnbfd.tests;

import nl.ru.rd.facedetection.nnbfd.neuralnetwork.NeuralNetwork;

/**
 * Test a Complex Neural Network's ability to learn semi-random patterns.
 * @author Wouter Geraedts (s0814857)
 */
public class ComplexTest extends Test
{
	public void test()
	{
		this.set = new double[][][] {
				{{0,0,0,0}, {0}},
				{{0,0,0,1}, {0}},
				{{0,0,1,0}, {0}},
				{{0,0,1,1}, {1}},
				{{0,1,0,0}, {0}},
				{{0,1,0,1}, {1}},
				{{0,1,1,0}, {0}},
				{{0,1,1,1}, {1}},
				{{1,0,0,0}, {0}},
				{{1,0,0,1}, {1}},
				{{1,0,1,0}, {0}},
				{{1,0,1,1}, {0}},
				{{1,1,0,0}, {0}},
				{{1,1,0,1}, {0}},
				{{1,1,1,0}, {0}},
				{{1,1,1,1}, {1}},
		};
		
		NeuralNetwork network = new ComplexNetwork();
		this.learn(network, 0.05);
	}
	
	public static void main(String[] args)
	{
		ComplexTest test = new ComplexTest();
		test.test();
	}
}
